<html>
<head><meta charset="utf-8"><title>blessing clippy tests in-tree · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html">blessing clippy tests in-tree</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217343877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217343877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217343877">(Nov 19 2020 at 23:16)</a>:</h4>
<p>How do I bless Clippy tests in-tree? I tried <code>./x.py test src/tools/clippy --bless</code>, but that didn't work, and neither did <code>tests/ui/update-all-references.sh</code>.</p>



<a name="217343933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217343933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217343933">(Nov 19 2020 at 23:17)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="264664">@flip1995</span></p>



<a name="217345757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217345757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217345757">(Nov 19 2020 at 23:40)</a>:</h4>
<p>running the clippy tests via ./x.py test src/tools/clippy and then running tests/ui/update-all-references.sh from the clippy repo root dir does not work?</p>



<a name="217345779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217345779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217345779">(Nov 19 2020 at 23:40)</a>:</h4>
<p>There's no tooling for this (yet). You will have to do this by hand. The problem is, that clippy people are not really interested in tooling in the rust compiler and in the rust compiler this is not something that should happen very often. Test changes usually come with feature changes and those should be done in the clippy repo (with exceptions).</p>
<p>So no one has put time into this...</p>



<a name="217345937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217345937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217345937">(Nov 19 2020 at 23:42)</a>:</h4>
<p><span class="user-mention" data-user-id="217864">@matthiaskrgr</span> probably not, because compiletest output is saved in another dir in the rustc test suite, than in the clippy test suite. And the script hardcoded these paths IIRC</p>



<a name="217345980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217345980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217345980">(Nov 19 2020 at 23:43)</a>:</h4>
<p>Hmm, maybe I could <code>cp</code> the files somehow? Hopefully I won't end up having to hand-update all of these tests...</p>



<a name="217345985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217345985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217345985">(Nov 19 2020 at 23:43)</a>:</h4>
<p>ooooh ok</p>



<a name="217346153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217346153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217346153">(Nov 19 2020 at 23:45)</a>:</h4>
<p>You can try to grep the clippy source for <code>RUSTC_TEST</code>. There should be some code checking for this var and then setting the output dir depending on it.</p>



<a name="217346154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217346154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217346154">(Nov 19 2020 at 23:45)</a>:</h4>
<p>It should, I imagine, be possible to use the clippy repo either separately or within the rustc repo directly, configuring it's compiler toolchain like +stage2 or so.</p>



<a name="217346165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217346165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217346165">(Nov 19 2020 at 23:45)</a>:</h4>
<p>(in the worst case)</p>



<a name="217346190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/blessing%20clippy%20tests%20in-tree/near/217346190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/blessing.20clippy.20tests.20in-tree.html#217346190">(Nov 19 2020 at 23:45)</a>:</h4>
<p>I would like to see this work with x.py, I just personally am unlikely to find time to do so in the short to medium term.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>